Skip to content

Fix axis textcolor in transform3d#58

Closed
mzahana wants to merge 1 commit into
rai-opensource:masterfrom
mzahana:pr_fix_axis_textcolor
Closed

Fix axis textcolor in transform3d#58
mzahana wants to merge 1 commit into
rai-opensource:masterfrom
mzahana:pr_fix_axis_textcolor

Conversation

@mzahana

@mzahana mzahana commented Sep 13, 2022

Copy link
Copy Markdown

This PR fixes the issue of not setting the axis label textcolor appropriately.

trplot(T,  frame='W', color="green", length=3, dims=[-5,5], axes=ax1)

Will only change the color of axes, but not their labels. The labels stay blue.

With this PR, the axes label will take the color of color argument

@petercorke

Copy link
Copy Markdown
Collaborator

thanks for the PR but the change seems a bit drastic. You can set text and axis color separately. If textcolor is not given it is inherited from color but I think there is a bug in line 2936 which assume color is a tuple.

@stefangachter

Copy link
Copy Markdown
Contributor

@petercorke , I think @mzahana proposal is justified, though I would do it slightly differently #70. There are two issues. One is that it is not possible to set the color of origin and the other is that it is not possible to set the color of axis labels if a frame label is given.

@petercorke

Copy link
Copy Markdown
Collaborator

ok, so what are the options we need to provide? Most general is to pass in a dict of parameters for origin, line, text which would allow fine grain control of appearance. Would that do it?

@stefangachter

Copy link
Copy Markdown
Contributor

No, there is no need to do that for the time being. There are textcolor and origincolor available. So, no additional options are needed. However, the logic in the trplot overwrites the colors inappropriately. #70 proposes to fix the logic.

@petercorke

petercorke commented Mar 21, 2023

Copy link
Copy Markdown
Collaborator

I've made the change but not as a PR, there was a merge clash with the current version. You can find it here. Thanks for the reminder @stefangachter and for the original fix @mzahana.

Now on PyPi as part of 1.1.5. Lot's small tweaks going on at the moment.

@petercorke petercorke closed this Mar 21, 2023
@stefangachter

Copy link
Copy Markdown
Contributor

Thanks, Peter, for your effort. However, this will not fix the problem with the origin color. It needs further logic fixing as proposed #70. In addition, in the same function trplot there is an indexing error for axis color. Please see #69. It would be nice to have all these minor issues fixed together in 1.1.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants